<!DOCTYPE html>
<html>

<head>
    <title>Example</title>
    <style type="text/css">
    /* 只有Chorme 和Opera 支持in-range选择器 */
        :in-range {
            outline: medium solid green;
        }
        :out-of-range{
            outline: medium solid red;
        }
    </style>
</head>

<body>
    <form action="" method="POST">
        <p>
            <label for="price">
                $ per unit in your area:
                Name: <input type="number" min="0" max="100" 
                            value="1" id="" name="">
            </label>
        </p>
        <input type="submit" value="Submit">
    </form>
</body>

</html>